#{extends 'logged_user.html' /}
#{set title:'Handshakes' /}
<h3>Handshakes</h3>

#{if allHandshakes}
<table style="width:92%">
  <tr>
    <th>Title</th>
    <th>Offerer</th>
    <th>Valid Until</th>
    <th>Social Credit</th>
    <th>Status</th>
    <th>Details</th>
  </tr>
  #{list items:allHandshakes, as:'handshake'}
  <tr>
      <td>${handshake.offer.title}</td>
      <td>${handshake.offer.user.fullname}</td>
      <td>${handshake.request.user.fullname}</td>
      <td>${(int)handshake.offer.creditOffer}</td>
      <td>${handshake.status}</td>
      <td><a href="@{Handshakes.show(handshake.id)}">Details</a></td>
  </tr>
  #{/list}
</table>
#{/if}
#{else}
There are no handshakes.
#{/else}
